package com.frain.springcloud.provide;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.frain.springcloud.test.entity.User;

@FeignClient(name = "biz-provider-01")
public interface ProvideInterface {

    @RequestMapping(value = "/demo/getFind")
    public String getProviderDemo();

    @RequestMapping(value = "/demo/home", method = RequestMethod.GET)
    public String getProviderHome();

    @RequestMapping(value = "/demo/404")
    public String get404Url();

    @RequestMapping("/user/findOne")
    public User getUserOne(@RequestParam(value = "id", defaultValue = "1") Long id);

    @RequestMapping("/user/findOne")
    public String getUserStringOne(@RequestParam(value = "id", defaultValue = "1") Long id);

    @RequestMapping("/user/findOneUser")
    public String getUserStringOneByUser(@RequestBody User user);

}
